meson: Add -Dinstall-scanpci option, defaulting to false Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/merge_requests/42>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8fcd29c..999bbf7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml
@@ -88,7 +88,7 @@ stage: build parallel: matrix: - - MESON_OPTIONS: ['-Dzlib=disabled', '-Dzlib=enabled'] + - MESON_OPTIONS: ['-Dzlib=disabled', '-Dzlib=enabled', '-Dinstall-scanpci=true'] script: - mkdir -p ../_inst - meson setup builddir --prefix="$PWD/../_inst" -Dwarning_level=3 -Ddefault_library=both $MESON_OPTIONS
diff --git a/man/meson.build b/man/meson.build index bd2e430..36d9b27 100644 --- a/man/meson.build +++ b/man/meson.build
@@ -26,7 +26,6 @@ find_program('sed'), '-e', 's/__xorgversion__/"libpciaccess @0@" "X Version 11"/'.format(meson.project_version()), '@INPUT@', ], capture : true, - install : false, + install : get_option('install-scanpci'), install_dir : join_paths(get_option('prefix'), get_option('mandir'), 'man1'), ) - diff --git a/meson_options.txt b/meson_options.txt index af7fc31..d96f272 100644 --- a/meson_options.txt +++ b/meson_options.txt
@@ -35,3 +35,9 @@ type : 'feature', description : 'Enable zlib support to read gzip compressed pci.ids.', ) +option( + 'install-scanpci', + type : 'boolean', + value : false, + description : 'Install scanpci program and man page', +)
diff --git a/scanpci/meson.build b/scanpci/meson.build index 6ae1d6a..92a4cb2 100644 --- a/scanpci/meson.build +++ b/scanpci/meson.build
@@ -22,4 +22,5 @@ 'scanpci', 'scanpci.c', dependencies : [dep_pciaccess], + install : get_option('install-scanpci'), )